package com.panshi.service.impl;

import com.panshi.bean.PageUtil;
import com.panshi.bean.SearchBean;
import com.panshi.mapper.SearchMapper;
import com.panshi.service.SearchService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class SearchServiceImpl implements SearchService {
    @Resource
    private SearchMapper searchMapper;

    @Override
    public List<SearchBean> searchData(PageUtil pu) {//关键词搜索
        return searchMapper.searchData(pu);
    }
    public int searchTotal(PageUtil pu) {//相关总数
        return searchMapper.searchTotal(pu);
    }



    public List<SearchBean> hostSearch() {//热搜排行
        return searchMapper.hostSearch();
    }
}